Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactions: Fix broken UI on nested interactions #18499

Merged
merged 2 commits into from
Jun 17, 2022
Merged

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Jun 17, 2022

Reported here.

What I did

When using an array, any interactions within it were not receiving callsById, which is required for some interactions to render properly. This PR fixes that and extends one of the stories to cover this scenario.
I also fixed the key prop to not be an object.

How to test

  • Is this testable with Jest or Chromatic screenshots? No
  • Does this need a new example in the kitchen sink apps? No
  • Does this need an update to the documentation? No

If your answer is yes to any of these, please make sure to include it in your PR.

@nx-cloud
Copy link

nx-cloud bot commented Jun 17, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 5a7d04c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

const nodes = value.slice(0, 3).map((v) => <Node key={v} value={v} nested />);
const nodes = value
.slice(0, 3)
.map((v) => <Node key={JSON.stringify(v)} value={v} nested callsById={callsById} />);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSON.stringify is ugly but I think it's the simplest solution. I'm open to better suggestions.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - nice one

@shilman shilman merged commit 3863591 into next Jun 17, 2022
@shilman shilman deleted the fix-interactions-array branch June 17, 2022 10:44
@ghengeveld
Copy link
Member Author

This needs to be backported to 6.5 in order to make #18460 work, which also should be backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants